<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page import="java.util.ArrayList,edu.student.models.*, com.opensymphony.xwork2.ActionContext,java.util.Map,java.util.List" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="/static/jquery-1.3.1.js"></script>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script language="javascript">
function populateList(a){
	
	var b=a.options[a.selectedIndex].value;
	var sub = document.myform.action + '?semester=' + b;
	
	//document.myform.action = sub;
	document.myform.submit();
	
	
}

</script>
</head>
<body>
<s:form action="selectSubject" name="myform" >


<table align="center">
<tr>
<td>
<s:select name="semester" style="height: 30 px; width: 150px"  headerKey="1" headerValue="select semester" list="semesterlist" id="mysemester" onchange="populateList(this);"></s:select>
</td>
<td><s:select name="subject" style="height: 30 px; width: 150px"  label="" headerKey="1" headerValue="select subject" list="subjectlist" key="subject" id="mysubject" ></s:select></td>
<td><s:submit name="commandButton" value="Search" id = "mysubmit"  style="height: 30px; width: 150px" /></td>
 </tr>
 </table>
 
 
 
 
 


<br/><br/>
<table id ="text" align="center" border="1">
<tr>
<th>Semester</th>
<th>Subject</th>
<th>CGPA</th>
</tr>
<tr>
<td>Any</td>
<td>All</td>
<td><s:property value="cgpa"/></td>
</tr>
</table>




</s:form>
</body>
</html>